package com.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import pojo.user;

public interface UserMapper {

    @Select("Select * from user where name = #{name} and password = #{password}")
    user select(@Param("name")String name, @Param("password") String password);

    @Select("select * from user where name = #{name}")
    user select2(@Param("name")String name);

    @Insert("insert into user values (null,#{name},#{password}) ")
    void add(user u);
}
